15. 评估和理解练习
使用你到目前为止所学的函数,在下面的 Jupyter notebook 中探索
census_income_data.csv
,以回答 notebook 下面关于这些数据集特征的练习问题:
- 行数
- 列数
- 几列的数据类型
- 缺失值的列
- education 唯一值的数量
- 平均年龄
- 每周小时数的第 75 个百分位数
此数据最初来自 这里 。
Workspace
This section contains either a workspace (it can be a Jupyter Notebook workspace or an online code editor work space, etc.) and it cannot be automatically downloaded to be generated here. Please access the classroom with your account and manually download the workspace to your local machine. Note that for some courses, Udacity upload the workspace files onto https://github.com/udacity , so you may be able to download them there.
Workspace Information:
- Default file path:
- Workspace type: jupyter
- Opened files (when workspace is loaded): n/a
QUESTION:
此数据集中有多少行?
SOLUTION:
NOTE: The solutions are expressed in RegEx pattern. Udacity uses these patterns to check the given answer
QUESTION:
此数据集中有多少列?
SOLUTION:
NOTE: The solutions are expressed in RegEx pattern. Udacity uses these patterns to check the given answer
QUIZ QUESTION: :
匹配每列的正确数据类型
ANSWER CHOICES:
列 |
数据类型 |
---|---|
function |
|
int |
|
string |
|
string |
|
string |
|
class |
|
boolean |
|
float |
|
string |
|
int |
SOLUTION:
列 |
数据类型 |
---|---|
int |
|
int |
|
string |
|
string |
|
string |
|
string |
|
string |
|
string |
|
string |
|
string |
|
string |
|
string |
|
string |
|
string |
|
string |
|
string |
|
string |
|
string |
|
int |
|
int |
SOLUTION:
- workclass
- occupation
- native-country
QUESTION:
education
列有多少唯一值?
SOLUTION:
NOTE: The solutions are expressed in RegEx pattern. Udacity uses these patterns to check the given answer
QUESTION:
平均年龄四舍五入到最接近的整数是多少?
SOLUTION:
NOTE: The solutions are expressed in RegEx pattern. Udacity uses these patterns to check the given answer
QUESTION:
此数据集每周小时数的第 75 个百分位数是多少?
SOLUTION:
NOTE: The solutions are expressed in RegEx pattern. Udacity uses these patterns to check the given answer